# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=leiningen
pkgver=2.9.4
pkgrel=0
pkgdesc="Automate Clojure Projects"
options="!check" #No Checks
url="https://leiningen.org/"
arch="noarch !mips !mips64" # java
license="EPL-1.0"
depends="bash openjdk8"
subpackages="$pkgname-doc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	"
source="leiningen-$pkgver.tar.gz::https://github.com/technomancy/leiningen/archive/$pkgver.tar.gz
	https://github.com/technomancy/leiningen/releases/download/$pkgver/leiningen-$pkgver-standalone.zip
	fix-missing-quote.patch"

package() {
	install -Dm755 "$builddir/bin/lein-pkg" \
		"$pkgdir/usr/bin/lein"

	install -Dm644 "$builddir/doc/lein.1" \
		"$pkgdir/usr/share/man/man1/lein.1"

	install -Dm 644 "$srcdir/leiningen-$pkgver-standalone.zip" \
		"$pkgdir/usr/share/java/leiningen-$pkgver-standalone.jar"

	install -Dm644 bash_completion.bash \
		"$pkgdir"/usr/share/bash-completion/completions/lein
	install -Dm644 zsh_completion.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_lein
}

sha512sums="980bb74b29774b8595d8a1fc2aee61dd674a12b853d3cad751bf54700cab0109c2c87ffceb303c0b656fe89bc569021fcf11740175aa29d839ccbc9014a32fd3  leiningen-2.9.4.tar.gz
d6cb1a26a24b183a1a805ed6c79b3e42fd689396574b802448dbca26869f8530ff7ef414212c198450a540e699ac072e73330395c5035d62db8e2e0e777d45c3  leiningen-2.9.4-standalone.zip
3632075bf17370be83ebad8a096da7adea7d242ab6b547898be339dcca7999bc5525b9f56fc7dbe541333e556365ab8ebb1da1575ff8a786e9f6bec9c8947d38  fix-missing-quote.patch"
